package com.thingple.rodbell.down;

public class CommandProcessor {

    private static void tx(byte[] payload) {

    }

    private static void send(byte[] payload) {
        tx(payload);
    }

    public static void setPower(byte... power) {
//        System.err.println("===========================>BLE_setPower");
        byte[] payload = new byte[]{(byte) 0xa0, 0x07, 0x01, (byte) 0x76, 0x00, 0x00, 0x00, 0x00, 0x33};
        int i = 0;
        for (byte p : power) {
            if (p >= 0 && p <= 33) {
                payload[i + 4] = p;
            }
            i++;
        }

        send(payload);
    }
}
